package com.nhh.v.dto;

import javax.validation.constraints.NotEmpty;

/**
 * Created by ywp on 2018/9/3.
 */
public class RequiredRequestHeader {

    public RequiredRequestHeader() {
    }

    public RequiredRequestHeader(String uid, String token, String userType) {
        this.uid = uid;
        this.token = token;
        this.userType = userType;
    }

    @NotEmpty(message = "header中uid不能为空")
    private String uid;
    @NotEmpty(message = "header中token不能为空")
    private String token;
    @NotEmpty(message = "header中userType不能为空")
    private String userType;

    public static RequiredRequestHeaderBuilder builder() {
        return new RequiredRequestHeaderBuilder();
    }

    public String getUid() {
        return this.uid;
    }

    public String getToken() {
        return this.token;
    }

    public String getUserType() {
        return this.userType;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public static class RequiredRequestHeaderBuilder {
        private String uid;
        private String token;
        private String userType;

        RequiredRequestHeaderBuilder() {
        }

        public RequiredRequestHeaderBuilder uid(String uid) {
            this.uid = uid;
            return this;
        }

        public RequiredRequestHeaderBuilder token(String token) {
            this.token = token;
            return this;
        }

        public RequiredRequestHeaderBuilder userType(String userType) {
            this.userType = userType;
            return this;
        }

        public RequiredRequestHeader build() {
            return new RequiredRequestHeader(uid, token, userType);
        }

        public String toString() {
            return "RequiredRequestHeader.RequiredRequestHeaderBuilder(uid=" + this.uid + ", token=" + this.token + ", userType=" + this.userType + ")";
        }
    }
}
